prestashop category as homepage

62

/* 
 * Better way with overide
 * 1. Create file override/controllers/front/IndexController.php
 * 2. Insert code
 * 3. Remove file cache/class_index.php
 */
class IndexControllerCore extends FrontController {
  public function initContent() {
  	Tools::redirect('index.php?id_category=3&controller=category');
  }
}
/* Quick and dirty
 * in file Controllers/IndexController.php
 */
public function initContent() {
   parent::initContent();
   Tools::redirect('index.php?id_category=10&controller=category');
   $this->context->smarty->assign('HOOK_HOME', Hook::exec('displayHome'));
   $this->setTemplate(_PS_THEME_DIR_.'index.tpl');
}

Comments

Submit
0 Comments